Differentiated processing method of image zones

ABSTRACT

A method for improving the perception of an image may include performing a main separation of the pixels of the image into two categories, one corresponding to pixels of a flat zone, and the other corresponding to pixels of a textured zone. The method may also include processing the pixels of each category according to a method optimized according to the type of zone. Before the main separation step, a preliminary separation of the pixels may be performed into one category of normal pixels intended for the main separation step, and one category of singular pixels, with the criterion for selecting the singular pixels being adapted to identify pixels that would be wrongly identified as pixels of a textured zone. The singular pixels may then be processed according to a method adapted to their nature.

FIELD OF THE INVENTION

The present disclosure relates to image processing for improving visualperception, and, more particularly, to image processing performed withinembedded systems, such as digital cameras.

BACKGROUND OF THE INVENTION

Among common processes used to improve the visual perception of animage, noise reduction, sharpness improvement and improvement of thebalance of brightness and contrast are included. The quality and theusefulness of each of these processes depend on the properties of theimage in the vicinity of each pixel processed. Therefore, some zones ofthe image may be differentiated so as to select the most appropriateprocess for each zone.

FIG. 1 shows an image comprising two types of zones where it isdesirable to process each zone differently: a flat zone 10, such as azone depicting the sky, and a textured zone 12, such as a zone depictingleaves. In a flat zone, noise reduction is favored, while in a texturedzone, sharpness, brightness, and contrast balancing are favored. Noisereduction techniques suited for textured zones can also be used, such asdescribed in U.S. Patent Application Publication No. 2009/0141978 toRoffet et al.

Common image processes, i.e. at least the relatively simple onespreferably used in embedded systems, are based on a reference kerneldefined around each pixel to be processed. FIG. 2 represents such akernel. It is a 5×5-pixel square of the image, in the center of which isa pixel to be processed. This kernel size is common and offers a goodcomplexity compromise.

FIG. 3 represents a reference kernel 14 processing stream, enablingdifferentiated processing according to the nature of the zone in whichthe pixel being processed is located. In block 16, a criterionrepresentative of the pixel belonging to a flat zone (10 in FIG. 1) iscalculated from the kernel. If the criterion is not met, the pixel isconsidered to belong to a textured zone (12), and the kernel 14undergoes, in block 18, a process adapted to the textured zones. If thecriterion is met, the kernel undergoes, in block 20, a process adaptedto flat zones. The process in blocks 18 or 20 produces a single pixelPx_(out), replacing the current pixel in the new image.

One example of selection criterion can be as follows. As represented inFIG. 2, for each pixel i in the reference kernel, the difference d_(i)between this pixel and the central pixel, which is the pixel to beprocessed, is calculated. In the case of a 5×5 kernel, 24 differences d₁to d₂₄ are obtained, with the zero difference for the central pixel notbeing counted. The differences are calculated in terms of luminance.

It is then considered that the pixel to be processed belongs to a flatzone if the number of differences below a luminance threshold is closeto the number of pixels in the kernel (e.g. at least equal to 22 in thecase of a 5×5 kernel).

Occasionally, such algorithms do not classify certain pixels correctly.For example, if the pixels in the kernel are all similar except for thecentral pixel, all the differences have a high value, such that thecriterion above classifies the pixel as not belonging to a flat zone,whereas it is manifestly an incorrect pixel in a flat zone. The pixel isthus classified as belonging to a textured zone. The textured zone thenundergoes processes such as sharpness improvement, which may result inamplifying the singularity of the wrongly classified pixel, making iteven more visible.

More complex algorithms would enable this specific example to beidentified and to potentially correct it. However, it should be recalledthat, within the framework of embedded systems, the complexity of thealgorithms may need to be limited. Furthermore, only one strikingsingular case is mentioned above, but there are more subtle cases inwhich the pixels are wrongly classified and also generate unpleasantvisual artifacts.

FIG. 4 shows a more detailed example of a processing stream 18 of thepixels classified as belonging to a textured zone. A RAM memory is usedas a temporary working space and stores parts of the image beingprocessed. A non-volatile memory NVM stores the original images andreceives the images after processing. A first process NR includes, forexample, an adaptive noise reduction optimized for textured zones, asdisclosed in U.S. Patent Application Publication No. 2009/0141978 toRoffet et al. This process works on reference kernels 14 read in theoriginal image, for example, 5×5-pixel kernels containing the pixel tobe processed in the center. The pixels to be processed have beenidentified by the decision step 16 in FIG. 3. The process calculates asingle pixel from the kernel, with the pixel being stored in the RAMmemory.

The next step SHARP is, for example, an increase in the sharpness. Thisprocess also works on a reference kernel, 14.2, which may differ in sizeto the kernel 14. The kernel 14.2 is read in the RAM memory when theprocess NR has produced the pixels defining it. The process SHARPcalculates a single pixel from the kernel 14.2, with the pixel beingwritten in the RAM memory.

The next step USM comprises, for example, an increase in the acutance,which includes an increase in the local contrast and an accentuation inthe transitions between two adjacent colors. This technique is commonlydesignated by the acronym USM (UnSharp Mask). Like the previousprocesses, the USM process works on a reference kernel 14.3, read in theRAM memory when the previous process has produced all the pixels of thiskernel. The USM process produces from the kernel 14.3 a single pixeldefining the final processed image, which is written, for example, inthe non-volatile memory NVM.

It can be seen that each process works on pixels defining anintermediate image produced by the previous process. With threeprocesses, two intermediate images are used, the necessary zones ofwhich are stored in the RAM memory. This RAM memory is generally afast-access memory so as not to slow down the processing. It isgenerally not possible to store the intermediate images in thenon-volatile memory NVM, as access to such memories is too slow.

SUMMARY OF THE INVENTION

The object is to have a processing method differentiated by zones thatreduces or does not generate any visible artifacts, while being lesscomplex.

The present disclosure discloses an approach including a method forimproving the perception of an image comprising performing a mainseparation of the pixels of the image into two categories, onecorresponding to pixels of a flat zone, and the other corresponding topixels of a textured zone. The method may include processing the pixelsof each category according to a method optimized according to the typeof zone. Before the main separation step, a preliminary separation ofthe pixels may be performed into one category of normal pixels intendedfor the main separation step, and one category of singular pixels, thecriterion for selecting the singular pixels being adapted to identifypixels that would be wrongly identified as pixels of a textured zone.The singular pixels may then processed according to a method adapted totheir nature.

According to one embodiment, the preliminary separation may compriseobtaining a reference kernel around the pixel being analyzed, andcalculating the difference between each pixel in the reference kerneland the current pixel. The preliminary separation may compriseidentifying the current pixel as a singular pixel if any one of thefollowing conditions is met: the number of non-zero positive differencesis close to the number of pixels in the kernel; the number of non-zeronegative differences is close to the number of pixels in the kernel; thenumber of non-zero positive differences is close to the number ofnon-zero negative differences; and the luminance dynamics of thereference kernel are below a threshold.

According to one embodiment, the processing of each singular pixel maycomprise calculating four sums of differences, a first one equal to thesum of the differences corresponding to the north and south pixels inthe reference kernel, a second one equal to the sum of the differencescorresponding to the east and west pixels, a third one equal to the sumof the differences corresponding to the north-west and south-eastpixels, and the fourth one equal to the sum of the differencescorresponding to the north-east and south-west pixels. The processingmay also include finding the minimum sum, and calculating the currentpixel as the mean of pixels located on the axis of the pixelscorresponding to the minimum sum.

It may also be desirable to reduce the memory resources used when anoriginal image, or a zone of the latter, undergoes a series ofindependent processes, with each producing a pixel calculated using arespective reference kernel. To that end, the reference kernels may allcomprise pixels from the original image.

According to one embodiment, the processes may be performed in paralleland a resulting pixel is produced as a combination of the respectivepixels produced by the processes. According to one embodiment, themethod may comprise replacing a key pixel in the reference kernel usedfor a current process with the pixel produced by the previous process.According to another embodiment, the processes may be performed on atextured image zone and comprise an adaptive noise reduction, asharpness increase, and an improvement of the acutance using the unsharpmasks.

BRIEF DESCRIPTION OF THE DRAWINGS

Some embodiments will be explained in the following description, inrelation with, but not limited to, the following figures, in which:

FIG. 1 is a schematic diagram of an image comprising two zones,according to the prior art.

FIG. 2 is a schematic diagram of a reference kernel for identifying atype of zone, according to the prior art.

FIG. 3 is a schematic diagram of an example of a differentiatedprocessing stream for processing two zones of an image in adifferentiated manner, according to the prior art.

FIG. 4 is a schematic diagram of a processing stream for processing atextured zone of an image, according to the prior art.

FIG. 5 is a schematic diagram of a processing stream for processing animage based on a pre-identification of singular pixels, according to thepresent invention.

FIG. 6 is a schematic diagram of one use of a reference kernel forprocessing the singular pixels, according to the present invention.

FIG. 7A is a schematic diagram of one embodiment of a processing streamfor processing a textured zone, optimized to limit the memory resources,according to the present invention.

FIG. 7B is a schematic diagram of a second embodiment of an optimizedprocessing stream, according to the present invention.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 5 illustrates a differentiated processing stream for processingsome zones of an image, wherein singular pixels are pre-selected and areextracted from the main stream to undergo a specific process. The objectis to extract from the main stream the pixels likely to be classified byerror in a category tending to produce visual artifacts, particularlythe category corresponding to a textured zone. An oppositeclassification error, i.e. comprising classifying a pixel as belongingto a flat zone when it belongs to a textured zone, may not have anynoteworthy visual consequences, and the object here is not to identifysuch pixels.

In practice, the pixels of the image are separated into three differentcategories, each one being subjected to an appropriate process. The mainstream corresponds, for example, to the one in FIG. 3. Thus, in block16, the category of the pixel is determined according to a simpletypical criterion and, depending on the result, it is directed to aprocess adapted to textures, in block 18, or to flat zones, in block 20.

A decision or pre-selection step 50 is provided upstream from step 16.The reference kernels 14 of the original image are compared with asingularity criterion. If the pixel is classified as singular, it isextracted from the normal stream and directed to an appropriate processin block 52. Like the processes in blocks 18 and 20, the process inblock 52 produces a single pixel Px_(out) calculated from the referencekernel. It may be understood that, if the pixel is not classified assingular, it is directed to the normal stream, via the separation inblock 16.

Generally speaking, the singularity criterion is developed to detectpixels that would be wrongly classified in step 16, particularly pixelsbelonging to a flat zone which would be classified as belonging to atexture. The following example of a singularity criterion has theadvantage of being simple. Like for the criterion for separatingflat/textured zones described in relation with FIG. 2, the differenced_(i) between the pixel i and the central pixel is calculated for eachpixel i in the reference kernel. These differences may then be used instep 16, as applicable.

A pixel is then considered singular if any one of the followingconditions is met:

-   -   1. the number of non-zero positive differences is close to the        number of pixels in the kernel;    -   2. the number of non-zero negative differences is close to the        number of pixels in the kernel;    -   3. the number of non-zero positive differences is close to the        number of non-zero negative differences; and    -   4. the luminance dynamics of the reference kernel is of low        amplitude.

“Close” means a difference of a few units between the numbers, dependingon the size of the kernel. For a 5×5 kernel, the numbers can beconsidered close if the difference is less than or equal to 2, i.e. onthe order of 10% of the number of pixels in the kernel. The differenceselected in each condition may be optimized by successive tests orstatistical analyses.

The fourth component can be expressed by d_(max)−d_(min)<L, in whichd_(max) and d_(min) are respectively the maximum difference and theminimum difference found in the reference kernel, and L is a luminancethreshold, for example, on the order of 20% of the maximum dynamics.This component may enable contrasted regular pixels to be excluded fromthe image, such as light points on a dark surface or holes on a palesurface. Such pixels are appropriately processed in the normal stream,in which they may be classified as belonging to a texture.

The process performed in block 52 could be the process reserved for flatzones in block 20, generally a noise reduction by averaging calculatedon the pixels in the kernel. A singular pixel could indeed be a pixeldistorted by noise.

However, the abovementioned criterion, particularly its third or fourthcomponent, also enables pixels located on a transition between zones ofdifferent brightness to be detected, which would also be detected inblock 16 as belonging to a texture. Such a detection in block 16 is notnecessarily wrong, since a transition between two texture elements canbe considered to belong to the texture. However, better results havebeen obtained by processing such pixels using directional averaging.

FIG. 6 shows an example of using the pixels in the reference kernel toperform a simple directional averaging calculation. In the referencekernel, nine pixels are kept: the central pixel and the North N, SouthS, East E, West W, North-West NW, North-East NE, South-West SW andSouth-East SE pixels, i.e. a reduced reference kernel of 3×3 pixels isformed. The sum of the differences is calculated for each pair ofopposite pixels in the reduced kernel, i.e. d₁₁+d₁₄ (or d_(W)+d_(E)),d₁+d₂₄ (or d_(NW)+d_(SE)), d₃+d₂₂ (or d_(N)+d_(S)), and d₅+d₂₀ (ord_(NE)+d_(SW)). The outgoing pixel Px_(out) is then calculated as themean of the pixels corresponding to the minimum sum of the differences.For example, if the minimum sum is d_(N)+d_(S), the following isobtained:Px _(out)=(Px _(N) +Px _(S))/2.

According to one embodiment, the value of the central pixel Px_(c) isused:Px _(out)=(Px _(N) +Px _(S) +Px _(c))/3.According to another embodiment, the mean of two pixels, or of all thepixels, located on the axis of the two pixels corresponding to theminimum sum is calculated.

As mentioned above in relation with FIG. 4, when a process comprises thesuccessive application of several independent algorithms, which iscommon for processing textured zones, each algorithm typically stores ina volatile memory an intermediate image portion, used by the followingalgorithm. It may be desirable to try to reduce the size of the volatilememory, particularly in embedded systems. This reduces the surface areaof the circuits and power consumption.

FIG. 7A illustrates one embodiment of a processing stream enabling thesize of the volatile memory to be reduced. The principle underlying thisstream is to use reference kernels for the successive algorithms whosepixels are taken from the original image, and to only handle in eachstep the pixel produced by the previous step.

For example, in FIG. 7A, for each pixel to be processed, a referencekernel 14 is read in the memory MEM containing the original image. Thiskernel is processed typically by the first algorithm NR, such as anadaptive noise reduction algorithm, which produces a first intermediatepixel Px₂. A reference kernel 14.2′ is regenerated by taking the kernel14 and replacing its key pixel, generally the central pixel, with thepixel Px₂. This kernel 14.2′ supplies the next algorithm SHARP, forexample, a sharpness improvement, which produces a new intermediatepixel Px₃. A new reference kernel 14.3′ is regenerated, for the nextalgorithm USM, by taking the original kernel 14 and by replacing its keypixel with the pixel Px₃.

In this way, only the reference kernel 14 is stored in a fast memory,with this kernel being reused by each algorithm in the processing chain.The size of the reference kernel may depend on the algorithm used.Whatever its size, its pixels are all taken from the original image,which makes it easier to manage kernels of different sizes.

The processing time is furthermore significantly accelerated, as analgorithm in the chain no longer needs to wait for the previousalgorithm to produce all the pixels of its reference kernel. Thisreference kernel is ready as soon as its key pixel is produced by theprevious algorithm.

It may be understood that, from the second algorithm in the chainonwards, the algorithms do not act on the same pixels as in the classicstream in FIG. 4. Therefore, a different resulting image is expected. Ithappens that the resulting image, even if it is indeed different in somecases, provides a satisfactory, or better, visual perception.

FIG. 7B illustrates a second embodiment of a processing stream enablingthe size of the volatile memory to be reduced. Compared to FIG. 7A,instead of including the outgoing pixel of an algorithm in the center ofthe reference kernel for the next algorithm, each algorithm is used inparallel on a kernel fully formed of pixels from the original image,including the key pixel. The pixels produced independently by thealgorithms are combined by a process or circuit WAVG to produce theoutgoing pixel Px_(out). This combination may be a weighted sum. As partof a usual process comprising a noise reduction (NR), an increase insharpness (SHARP), and an improvement in the acutance (USM), respectivevalues of 1, 1/32 and 1/64 are used as an example for the weightingcoefficients. The end result is different from the one produced by thestreams in FIGS. 4 and 7A, but the visual perception of the image isalso satisfactory.

That which is claimed is:
 1. A method for image processing comprising:using a processor and associated memory for performing a separation of aplurality of pixels into first and second categories, the first categorycorresponding to pixels in a flat zone, and the second categorycorresponding to pixels in a textured zone; using the processor andassociated memory for processing the pixels of the first category basedupon a method for the flat zone, and the pixels of the second categorybased upon a method for the textured zone; using the processor andassociated memory for, before the separation, performing a preliminaryseparation of the plurality of pixels into a normal pixel category ofpixels for the separation, and a singular pixel category, thepreliminary separation being based upon a criterion for selectingsingular pixels as pixels that would be wrongly identified as pixels ofthe textured zone; and using the processor and associated memory forprocessing pixels in the singular pixel category.
 2. The methodaccording to claim 1 wherein the preliminary separation comprises:obtaining a reference kernel around a current pixel being analyzed;calculating a difference between each pixel in the reference kernel andthe current pixel; and identifying the current pixel as a singularpixel.
 3. The method according to claim 2 wherein identifying thecurrent pixel as the singular pixel is based upon when at least one ofthe following conditions is true: a number of non-zero positivedifferences is close to a number of pixels in the reference kernel; anumber of non-zero negative differences is close to the number of pixelsin the reference kernel; the number of non-zero positive differences isclose to the number of non-zero negative differences; and a luminancedynamic value of the reference kernel is below a threshold.
 4. Themethod according to claim 2 wherein processing each singular pixelcomprises: calculating a plurality of sums of differences comprising afirst sum equal to a sum of differences corresponding to north and southpixels in the reference kernel, a second sum equal to a sum ofdifferences corresponding to east and west pixels, a third sum equal toa sum of differences corresponding to north-west and south-east pixels,and a fourth sum equal to a sum of the differences corresponding tonorth-east and south-west pixels; finding a minimum sum; and calculatingthe current pixel as a mean of pixels located on an axis of pixelscorresponding to the minimum sum.
 5. The method according to claim 1further comprising processing the textured zone by at least: subjectingeach pixel of the textured zone to a series of independent processes,each independent process producing a pixel calculated using a respectivereference kernel; and taking pixels from the respective referencekernels in an original image.
 6. The method according to claim 5 furthercomprising producing a final pixel as a combination of individual pixelsproduced by the series of independent processes.
 7. The method accordingto claim 5 wherein the series of independent processes is performed inparallel and a resulting pixel is produced as a weighted sum of therespective pixels produced by the series of independent processes. 8.The method according to claim 5 wherein the series of independentprocesses is performed in the textured zone; and wherein the series ofindependent processes comprises an adaptive noise reduction process, asharpness increase process, and an improvement of the acutance using anunsharp masks process.
 9. A method for image processing comprising:using a processor and associated memory for performing a separation of aplurality of pixels into first and second categories, the first categorycorresponding to pixels in a flat zone, and the second categorycorresponding to pixels in a textured zone; using the processor andassociated memory for processing the pixels of the first category basedupon a method for the flat zone, and the pixels of the second categorybased upon a method for the textured zone; using the processor andassociated memory for, before the separation, performing a preliminaryseparation of the plurality of pixels into a normal pixel category ofpixels for the separation, and a singular pixel category, thepreliminary separation being based upon a criterion for selectingsingular pixels as pixels that would be wrongly identified as pixels ofthe textured zone, the preliminary separation comprising obtaining areference kernel around a current pixel being analyzed, calculating adifference between each pixel in the reference kernel and the currentpixel, and identifying the current pixel as a singular pixel; processingpixels in the singular pixel category; and processing the textured zoneby at least subjecting each pixel of the textured zone to a series ofindependent processes, each independent process producing a pixelcalculated using a respective reference kernel, and taking pixels fromthe respective reference kernels in an original image.
 10. The methodaccording to claim 9 wherein identifying the current pixel as thesingular pixel is based upon when at least one of the followingconditions is true: a number of non-zero positive differences is closeto a number of pixels in the reference kernel; a number of non-zeronegative differences is close to the number of pixels in the referencekernel; the number of non-zero positive differences is close to thenumber of non-zero negative differences; and a luminance dynamic valueof the reference kernel is below a threshold.
 11. The method accordingto claim 9 wherein processing each singular pixel comprises: calculatinga plurality of sums of differences comprising a first sum equal to a sumof differences corresponding to north and south pixels in the referencekernel, a second sum equal to a sum of differences corresponding to eastand west pixels, a third sum equal to a sum of differences correspondingto north-west and south-east pixels, and a fourth sum equal to a sum ofthe differences corresponding to north-east and south-west pixels;finding a minimum sum; and calculating the current pixel as a mean ofpixels located on an axis of pixels corresponding to the minimum sum.12. The method according to claim 11 further comprising producing afinal pixel as a combination of individual pixels produced by the seriesof independent processes.
 13. The method according to claim 11 whereinthe series of independent processes is performed in parallel and aresulting pixel is produced as a weighted sum of the respective pixelsproduced by the series of independent processes.
 14. The methodaccording to claim 11 wherein the series of independent processes isperformed in the textured zone; and wherein the series of independentprocesses comprises an adaptive noise reduction process, a sharpnessincrease process, and an improvement of the acutance using an unsharpmasks process.
 15. An electronic device comprising: a processor andmemory cooperating therewith and configured to perform a separation of aplurality of pixels into first and second categories, the first categorycorresponding to pixels in a flat zone, and the second categorycorresponding to pixels in a textured zone, process the pixels of thefirst category based upon a method for the flat zone, and the pixels ofthe second category based upon a method for the textured zone, beforethe separation, perform a preliminary separation of the plurality ofpixels into a normal pixel category of pixels for the separation, and asingular pixel category, the preliminary separation being based upon acriterion for selecting singular pixels as pixels that would be wronglyidentified as pixels of the textured zone, and process pixels in thesingular pixel category.
 16. The electronic device according to claim 15wherein the preliminary separation comprises: obtaining a referencekernel around a current pixel being analyzed; calculating a differencebetween each pixel in the reference kernel and the current pixel; andidentifying the current pixel as a singular pixel.
 17. The electronicdevice according to claim 16 wherein identifying the current pixel asthe singular pixel is based upon when at least one of the followingconditions is true: a number of non-zero positive differences is closeto a number of pixels in the reference kernel; a number of non-zeronegative differences is close to the number of pixels in the referencekernel; the number of non-zero positive differences is close to thenumber of non-zero negative differences; and a luminance dynamic valueof the reference kernel is below a threshold.
 18. The electronic deviceaccording to claim 16 wherein said processor and memory are configuredto process each singular pixel by at least: calculating a plurality ofsums of differences comprising a first sum equal to a sum of differencescorresponding to north and south pixels in the reference kernel, asecond sum equal to a sum of differences corresponding to east and westpixels, a third sum equal to a sum of differences corresponding tonorth-west and south-east pixels, and a fourth sum equal to a sum of thedifferences corresponding to north-east and south-west pixels; finding aminimum sum; and calculating the current pixel as a mean of pixelslocated on an axis of pixels corresponding to the minimum sum.
 19. Theelectronic device according to claim 15 wherein said processor andmemory are configured to process the textured zone by at least:subjecting each pixel of the textured zone to a series of independentprocesses, each independent process producing a pixel calculated using arespective reference kernel; and taking pixels from the respectivereference kernels in an original image.
 20. The electronic deviceaccording to claim 19 wherein said processor and memory are configuredto produce a final pixel as a combination of individual pixels producedby the series of independent processes.
 21. The electronic deviceaccording to claim 19 wherein the series of independent processes isperformed in parallel and a resulting pixel is produced as a weightedsum of the respective pixels produced by the series of independentprocesses.
 22. The electronic device according to claim 19 wherein theseries of independent processes is performed in the textured zone; andwherein the series of independent processes comprises an adaptive noisereduction process, a sharpness increase process, and an improvement ofthe acutance using an unsharp masks process.